<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Brain and Body Weights for 65 Species of Land Animals</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="R.css">
</head><body>

<table width="100%" summary="page for Animals2"><tr><td>Animals2</td><td align="right">R Documentation</td></tr></table>

<h2>Brain and Body Weights for 65 Species of Land Animals</h2>

<h3>Description</h3>


<p>A data frame with average brain and body weights for 62 species
of land mammals and three others.
</p>
<p>Note that this is simply the union of <code>Animals</code>
and <code>mammals</code>.
</p>


<h3>Usage</h3>

<pre>
Animals2
</pre>


<h3>Format</h3>



<dl>
<dt><code>body</code></dt><dd><p>body weight in kg</p>
</dd>
<dt><code>brain</code></dt><dd><p>brain weight in g</p>
</dd>
</dl>



<h3>Note</h3>


<p>After loading the <span class="pkg">MASS</span> package, the data set is simply constructed by
<code>Animals2 &lt;- local({D &lt;- rbind(Animals, mammals);
      unique(D[order(D$body,D$brain),])})</code>.
</p>
<p>Rousseeuw and Leroy (1987)'s &lsquo;brain&rsquo; data is the same as
<span class="pkg">MASS</span>'s <code>Animals</code> (with Rat and Brachiosaurus interchanged,
see the example below).
</p>


<h3>Source</h3>


<p>Weisberg, S. (1985)
<EM>Applied Linear Regression.</EM>
2nd edition.
Wiley, pp. 144&ndash;5.
</p>
<p>P. J. Rousseeuw  and A. M. Leroy (1987)
<EM>Robust Regression and Outlier Detection.</EM>
Wiley, p. 57.
</p>


<h3>References</h3>


<p>Venables, W. N. and Ripley, B. D. (2002)
<EM>Modern Applied Statistics with S.</EM> Forth Edition. Springer.
</p>


<h3>Examples</h3>

<pre>
data(Animals2)
## Sensible Plot needs doubly logarithmic scale
plot(Animals2, log = "xy")

## Regression example plot:
plotbb &lt;- function(bbdat) {
  d.name &lt;- deparse(substitute(bbdat))
  plot(log(brain) ~ log(body), data = bbdat, main = d.name)
  abline(       lm(log(brain) ~ log(body), data = bbdat))
  abline(MASS::rlm(log(brain) ~ log(body), data = bbdat), col = 2)
  legend("bottomright", leg = c("lm", "rlm"), col=1:2, lwd=1, inset = 1/20)
}
plotbb(bbdat = Animals2)

## The `same' plot for Rousseeuw's subset:
data(Animals, package = "MASS")
brain &lt;- Animals[c(1:24, 26:25, 27:28),]
plotbb(bbdat = brain)

lbrain &lt;- log(brain)
plot(mahalanobis(lbrain, colMeans(lbrain), var(lbrain)),
     main = "Classical Mahalanobis Distances")
mcd &lt;- covMcd(lbrain)
plot(mahalanobis(lbrain,mcd$center,mcd$cov),
     main = "Robust (MCD) Mahalanobis Distances")
</pre>


</body></html>
